from django.contrib import admin
from .models import User
# Register your models here.
@admin.register(User)
class UserAdmin(admin.ModelAdmin):
      list_display = ['id','account','username','password']
      search_fields = ['account','username']

      def save_model(self, request, user, form, change):
          if not user.username:
              user.username = user.account
          user.save()

